﻿using System;
using System.Drawing;

namespace ChipSharp
{
    class Panel
    {
        private Game myGame = null;
        private Renderer myRenderer = null;

        public Panel(Game game, Renderer renderer)
        {
            myGame = game;
            myRenderer = renderer;
            renderer.Panel = this;
        }

        public void Draw()
        {
            Bitmap panelArea = myRenderer.PanelArea;
            Graphics graph = Graphics.FromImage(panelArea);
            graph.FillRectangle(new SolidBrush(Color.Yellow), 
                new Rectangle(0, 0, panelArea.Width, panelArea.Height));
        }
    }
}
